<html>
<head>
    <title>运维管理</title>
    <link rel="stylesheet" href="../../../assets/theme-chalk/index.css">
    <link rel="stylesheet" href="../../../style.css">
    <link rel="stylesheet" href="../../../swipebox.css">
    <style>
        body {
            background: #F2F2F2;
        }

        .main-head {
            background: #fff;
            padding-left: 10px;
            padding-top: 10px;
            margin-bottom: 0px;
            border: solid 1px #fff;
        }

        .chart-outer {
            height: 200px;
        }

        .page-top {
            margin: 30px 0 0px 30px;

        }
    </style>
</head>
<body>
<div class="page" id="page-elesafe">

    <div class="page-title">预警隐患处理,预警信息</div>
    <div class="page-main">
        <el-row>
            <el-col :span="24" style="    background: #ffffff;">
                <el-form :inline="true" class="page-top">
                    <el-form-item>
                        <el-input placeholder="请输入预警接收人" style="width: 150px;" v-model="Name"></el-input>
                    </el-form-item>
                    <el-form-item>
                        <el-date-picker v-model="day" type="month" placeholder="选择月" style="width: 140px;">
                        </el-date-picker>
                    </el-form-item>
                    <el-form-item>
                        <el-button @click="seoBtn" type="primary">查询</el-button>
                        <!--<el-button @click="exportData" type="primary">导出</el-button>-->
                    </el-form-item>
                </el-form>
                <el-table border stripe style="width: 100%;margin-bottom: 50px" :data="tabData">
                    <el-table-column
                            type="index"
                            width="120" label="序号">
                    </el-table-column>
                    <el-table-column prop="zoneName" label="预警名称" align="center">
                    </el-table-column>
                    <el-table-column prop="userName" label="预警接收人" align="center">
                    </el-table-column>
                    <el-table-column prop="Telephone" label="联系方式" align="center">
                    </el-table-column>
                    <el-table-column prop="sendTime" label="预警时间" align="center">
                        <template slot-scope="scope" v-if="scope.row.sendTime">
                            <el-tag size="medium">{{scope.row.sendTime.replace("T"," ")}}</el-tag>
                        </template>
                    </el-table-column>
                    <el-table-column prop="content" label="预警内容" align="center">
                    </el-table-column>
                    <el-table-column prop="sendFlag" label="发送状态" align="center">
                        <template slot-scope="scope">
                            <div v-if="scope.row.sendFlag == '2'">
                                <el-tag size="medium" type="success">失败</el-tag>
                            </div>
                            <div v-if="scope.row.sendFlag == '1'">
                                <el-tag size="medium" type="success">成功</el-tag>
                            </div>
                            <div v-else-if="scope.row.sendFlag == '0'">
                                <el-tag size="medium" type="success">未发</el-tag>
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column prop="sendResult" label="发送结果" align="center">
                    </el-table-column>


                    <!--<el-table-column label="操作" width="500px" align="center">-->
                    <!--<template slot-scope="scope">-->
                    <!--&lt;!&ndash;<el-button @click="handleClick(scope.row)" round size="mini" icon="el-icon-edit"&ndash;&gt;-->
                    <!--&lt;!&ndash;v-if="scope.row.wf_processflag == '0'">处理&ndash;&gt;-->
                    <!--&lt;!&ndash;</el-button>&ndash;&gt;-->
                    <!--<el-button @click="showDetail(scope.row)" round size="mini" icon="el-icon-share"-->
                    <!--v-if="scope.row.wf_processflag == '2'">明细-->
                    <!--</el-button>-->
                    <!--<el-button round size="mini" icon="el-icon-share"-->
                    <!--@click="urgent(scope.row.Id,scope.row.wf_tasktime,scope.row.urgentCount)">催办-->
                    <!--&lt;!&ndash;                                <template slot-scope="scope" >&ndash;&gt;-->
                    <!--&lt;!&ndash;                                    ({{scope.row.urgentCount}})&ndash;&gt;-->
                    <!--&lt;!&ndash;                                </template>&ndash;&gt;-->
                    <!--</el-button>-->

                    <!--<template v-if="scope.row.effectiveFlag==0">-->
                    <!--<el-button round size="mini" icon="el-icon-share"-->
                    <!--@click="effective(scope.row.Id,1,scope.row.wf_tasktime,scope.row.wf_processflag)">-->
                    <!--不生效-->
                    <!--</el-button>-->
                    <!--</template>-->
                    <!--<template v-if="scope.row.effectiveFlag==1">-->
                    <!--<el-button round size="mini" icon="el-icon-share"-->
                    <!--@click="effective(scope.row.Id,0,scope.row.wf_tasktime,scope.row.wf_processflag)">-->
                    <!--生效-->
                    <!--</el-button>-->
                    <!--</template>-->

                    <!--<template v-if="scope.row.assessFlag==-1">-->
                    <!--<el-button round size="mini" icon="el-icon-share"-->
                    <!--@click="openAssess(scope.row.Id,scope.row.wf_tasktime)">-->
                    <!--验收-->
                    <!--</el-button>-->
                    <!--</template>-->
                    <!--<template v-else>-->
                    <!--<el-button round size="mini" icon="el-icon-share" @click="openAssessed(scope.row)">-->
                    <!--已验-->
                    <!--</el-button>-->
                    <!--</template>-->
                    <!--<el-button round size="mini" icon="el-icon-share"-->
                    <!--@click="checkdata(scope.row.Id,scope.row.wf_tasktime)">转派记录-->
                    <!--</el-button>-->
                    <!--</template>-->
                    <!--</el-table-column>-->
                </el-table>
            </el-col>
        </el-row>
    </div>
    <div class="page-footer">
        <el-pagination background layout="prev, pager, next" :pagesize="param.pagesize" :total="totalCount"
                       :current-page.sync="param.pageno" @current-change="onChangePage">
        </el-pagination>
    </div>
</div>


<!-- import Vue before Element -->
<script src="../../../assets/bundle.js"></script>
<!-- import JavaScript -->
<script type='text/javascript' src='../../../assets/bundle.js' charset='utf-8'></script>
<script type='text/javascript' src='../../../assets/jquery-1.11.2.min.js' charset='utf-8'></script>
<script type='text/javascript' src='../../../assets/echarts.min.js' charset='utf-8'></script>
<script type='text/javascript' src='../../../js/common.js' charset='utf-8'></script>
<script type='text/javascript' src='../../../js/component.js' charset='utf-8'></script>
<script type='text/javascript' src='../../../assets/jquery.swipebox.min.js' charset='utf-8'></script>
<script>
    let loading;
    var vuePage = new Vue({
        el: '#page-elesafe',
        data: {
            Name: '',
            formLabelWidth: '120px',
            currentPage: 1,
            tabData: [],
            form: {},
            uploadData: {},
            param: {
                pagesize: 10,
                pageno: 1,
            },
            totalCount: 0,
            day: '',

        },
        methods: {
            seoBtn: function () {
                this.getWorkFlow();
            },
            onChangePage(page) {
                this.param.pageno = page;
                this.getWorkFlow();
            },
            getWorkFlow() {
                const d = new Date(this.day);
                var param = {};
                if (this.Name)
                    param.userName = this.Name;
                param.year = d.getFullYear();
                param.month = d.getMonth() + 1;
                param.projectNo = SiteConfig.account.projectNo;
                param.pageno = this.param.pageno;
                param.pagesize = this.param.pagesize;
                HttpUtil.get('WorkFlow/SmsList', param).success((r) => {
                    this.totalCount = r.total;
                    this.tabData = r.data;
                })
            }
        },
        created: function () {

        },
        mounted: function () {
            this.day = TimeUtil.convertToString(new Date()).substr(0, 7);
            this.getWorkFlow();
            this.tooltip = true;
        },
    });
</script>

</body>
</html>

